/**
 * Author: Kevin O'Hara
 * 
 */
@isTest
private class TestStateFormatter {

    static testMethod void testStateFormatter() {
        
        StateFormatter.State state;
        
        //TESTING ALABAMA
		state = StateFormatter.getState('Alabama');
		System.assertEquals(state.stateCode, 'AL');
		
		state = StateFormatter.getState('AL');
		System.assertEquals(state.stateCode, 'AL');
		        
		state = StateFormatter.getState('alab');
		System.assertEquals(state.stateCode, 'AL');
				
		//TESTING ALASKA
		state = StateFormatter.getState('Alaska');
		System.assertEquals(state.stateCode, 'AK');
		
		state = StateFormatter.getState('AK');
		System.assertEquals(state.stateCode, 'AK');
		        
		state = StateFormatter.getState('alas');
		System.assertEquals(state.stateCode, 'AK');
				
		//TESTING AMERICAN SAMOA
		state = StateFormatter.getState('American Samoa');
		System.assertEquals(state.stateCode, 'AS');
		
		state = StateFormatter.getState('AS');
		System.assertEquals(state.stateCode, 'AS');
		        
		state = StateFormatter.getState('amer');
		System.assertEquals(state.stateCode, 'AS');
				
		//TESTING ARIZONA
		state = StateFormatter.getState('Arizona');
		System.assertEquals(state.stateCode, 'AZ');
		
		state = StateFormatter.getState('AZ');
		System.assertEquals(state.stateCode, 'AZ');
		        
		state = StateFormatter.getState('ari');
		System.assertEquals(state.stateCode, 'AZ');
				
		//TESTING ARKANSAS
		state = StateFormatter.getState('Arkansas');
		System.assertEquals(state.stateCode, 'AR');
		
		state = StateFormatter.getState('AR');
		System.assertEquals(state.stateCode, 'AR');
		        
		state = StateFormatter.getState('ark');
		System.assertEquals(state.stateCode, 'AR');
				
		//TESTING CALIFORNIA
		state = StateFormatter.getState('California');
		System.assertEquals(state.stateCode, 'CA');
		
		state = StateFormatter.getState('CA');
		System.assertEquals(state.stateCode, 'CA');
		        
		state = StateFormatter.getState('cal');
		System.assertEquals(state.stateCode, 'CA');
				
		//TESTING COLORADO
		state = StateFormatter.getState('Colorado');
		System.assertEquals(state.stateCode, 'CO');
		
		state = StateFormatter.getState('CO');
		System.assertEquals(state.stateCode, 'CO');
		        
		state = StateFormatter.getState('col');
		System.assertEquals(state.stateCode, 'CO');
				
		//TESTING CONNECTICUT
		state = StateFormatter.getState('Connecticut');
		System.assertEquals(state.stateCode, 'CT');
		
		state = StateFormatter.getState('CT');
		System.assertEquals(state.stateCode, 'CT');
		        
		state = StateFormatter.getState('con');
		System.assertEquals(state.stateCode, 'CT');
				
		//TESTING DELAWARE
		state = StateFormatter.getState('Delaware');
		System.assertEquals(state.stateCode, 'DE');
		
		state = StateFormatter.getState('DE');
		System.assertEquals(state.stateCode, 'DE');
		        
		state = StateFormatter.getState('del');
		System.assertEquals(state.stateCode, 'DE');
				
		//TESTING DISTRICT OF COLUMBIA
		state = StateFormatter.getState('District Of Columbia');
		System.assertEquals(state.stateCode, 'DC');
		
		state = StateFormatter.getState('DC');
		System.assertEquals(state.stateCode, 'DC');
		        
		state = StateFormatter.getState('dis');
		System.assertEquals(state.stateCode, 'DC');
				
		//TESTING FEDERATED STATES OF MICRONESIA
		state = StateFormatter.getState('Federated States Of Micronesia');
		System.assertEquals(state.stateCode, 'FM');
		
		state = StateFormatter.getState('FM');
		System.assertEquals(state.stateCode, 'FM');
		        
		state = StateFormatter.getState('fed');
		System.assertEquals(state.stateCode, 'FM');
				
		//TESTING FLORIDA
		state = StateFormatter.getState('Florida');
		System.assertEquals(state.stateCode, 'FL');
		
		state = StateFormatter.getState('FL');
		System.assertEquals(state.stateCode, 'FL');
		        
		state = StateFormatter.getState('flo');
		System.assertEquals(state.stateCode, 'FL');
				
		//TESTING GEORGIA
		state = StateFormatter.getState('Georgia');
		System.assertEquals(state.stateCode, 'GA');
		
		state = StateFormatter.getState('GA');
		System.assertEquals(state.stateCode, 'GA');
		        
		state = StateFormatter.getState('geo');
		System.assertEquals(state.stateCode, 'GA');
				
		//TESTING GUAM
		state = StateFormatter.getState('Guam');
		System.assertEquals(state.stateCode, 'GU');
		
		state = StateFormatter.getState('GU');
		System.assertEquals(state.stateCode, 'GU');
		        
		state = StateFormatter.getState('gua');
		System.assertEquals(state.stateCode, 'GU');
				
		//TESTING HAWAII
		state = StateFormatter.getState('Hawaii');
		System.assertEquals(state.stateCode, 'HI');
		
		state = StateFormatter.getState('HI');
		System.assertEquals(state.stateCode, 'HI');
		        
		state = StateFormatter.getState('haw');
		System.assertEquals(state.stateCode, 'HI');
				
		//TESTING IDAHO
		state = StateFormatter.getState('Idaho');
		System.assertEquals(state.stateCode, 'ID');
		
		state = StateFormatter.getState('ID');
		System.assertEquals(state.stateCode, 'ID');
		        
		state = StateFormatter.getState('ida');
		System.assertEquals(state.stateCode, 'ID');
				
		//TESTING ILLINOIS
		state = StateFormatter.getState('Illinois');
		System.assertEquals(state.stateCode, 'IL');
		
		state = StateFormatter.getState('IL');
		System.assertEquals(state.stateCode, 'IL');
		        
		state = StateFormatter.getState('ill');
		System.assertEquals(state.stateCode, 'IL');
				
		//TESTING INDIANA
		state = StateFormatter.getState('Indiana');
		System.assertEquals(state.stateCode, 'IN');
		
		state = StateFormatter.getState('IN');
		System.assertEquals(state.stateCode, 'IN');
		        
		state = StateFormatter.getState('ind');
		System.assertEquals(state.stateCode, 'IN');
				
		//TESTING IOWA
		state = StateFormatter.getState('Iowa');
		System.assertEquals(state.stateCode, 'IA');
		
		state = StateFormatter.getState('IA');
		System.assertEquals(state.stateCode, 'IA');
		        
		state = StateFormatter.getState('iow');
		System.assertEquals(state.stateCode, 'IA');
				
		//TESTING KANSAS
		state = StateFormatter.getState('Kansas');
		System.assertEquals(state.stateCode, 'KS');
		
		state = StateFormatter.getState('KS');
		System.assertEquals(state.stateCode, 'KS');
		        
		state = StateFormatter.getState('kan');
		System.assertEquals(state.stateCode, 'KS');
				
		//TESTING KENTUCKY
		state = StateFormatter.getState('Kentucky');
		System.assertEquals(state.stateCode, 'KY');
		
		state = StateFormatter.getState('KY');
		System.assertEquals(state.stateCode, 'KY');
		        
		state = StateFormatter.getState('ken');
		System.assertEquals(state.stateCode, 'KY');
				
		//TESTING LOUISIANA
		state = StateFormatter.getState('Louisiana');
		System.assertEquals(state.stateCode, 'LA');
		
		state = StateFormatter.getState('LA');
		System.assertEquals(state.stateCode, 'LA');
		        
		state = StateFormatter.getState('lou');
		System.assertEquals(state.stateCode, 'LA');
				
		//TESTING MAINE
		state = StateFormatter.getState('Maine');
		System.assertEquals(state.stateCode, 'ME');
		
		state = StateFormatter.getState('ME');
		System.assertEquals(state.stateCode, 'ME');
		        
		state = StateFormatter.getState('mai');
		System.assertEquals(state.stateCode, 'ME');
				
		//TESTING MARSHALL ISLANDS
		state = StateFormatter.getState('Marshall Islands');
		System.assertEquals(state.stateCode, 'MH');
		
		state = StateFormatter.getState('MH');
		System.assertEquals(state.stateCode, 'MH');
		        
		state = StateFormatter.getState('mars');
		System.assertEquals(state.stateCode, 'MH');
				
		//TESTING MARYLAND
		state = StateFormatter.getState('Maryland');
		System.assertEquals(state.stateCode, 'MD');
		
		state = StateFormatter.getState('MD');
		System.assertEquals(state.stateCode, 'MD');
		        
		state = StateFormatter.getState('mary');
		System.assertEquals(state.stateCode, 'MD');
				
		//TESTING MASSACHUSETTS
		state = StateFormatter.getState('Massachusetts');
		System.assertEquals(state.stateCode, 'MA');
		
		state = StateFormatter.getState('MA');
		System.assertEquals(state.stateCode, 'MA');
		        
		state = StateFormatter.getState('mas');
		System.assertEquals(state.stateCode, 'MA');
				
		//TESTING MICHIGAN
		state = StateFormatter.getState('Michigan');
		System.assertEquals(state.stateCode, 'MI');
		
		state = StateFormatter.getState('MI');
		System.assertEquals(state.stateCode, 'MI');
		        
		state = StateFormatter.getState('mic');
		System.assertEquals(state.stateCode, 'MI');
				
		//TESTING MINNESOTA
		state = StateFormatter.getState('Minnesota');
		System.assertEquals(state.stateCode, 'MN');
		
		state = StateFormatter.getState('MN');
		System.assertEquals(state.stateCode, 'MN');
		        
		state = StateFormatter.getState('min');
		System.assertEquals(state.stateCode, 'MN');
				
		//TESTING MISSISSIPPI
		state = StateFormatter.getState('Mississippi');
		System.assertEquals(state.stateCode, 'MS');
		
		state = StateFormatter.getState('MS');
		System.assertEquals(state.stateCode, 'MS');
		        
		state = StateFormatter.getState('missi');
		System.assertEquals(state.stateCode, 'MS');
				
		//TESTING MISSOURI
		state = StateFormatter.getState('Missouri');
		System.assertEquals(state.stateCode, 'MO');
		
		state = StateFormatter.getState('MO');
		System.assertEquals(state.stateCode, 'MO');
		        
		state = StateFormatter.getState('misso');
		System.assertEquals(state.stateCode, 'MO');
				
		//TESTING MONTANA
		state = StateFormatter.getState('Montana');
		System.assertEquals(state.stateCode, 'MT');
		
		state = StateFormatter.getState('MT');
		System.assertEquals(state.stateCode, 'MT');
		        
		state = StateFormatter.getState('mon');
		System.assertEquals(state.stateCode, 'MT');
				
		//TESTING NEBRASKA
		state = StateFormatter.getState('Nebraska');
		System.assertEquals(state.stateCode, 'NE');
		
		state = StateFormatter.getState('NE');
		System.assertEquals(state.stateCode, 'NE');
		        
		state = StateFormatter.getState('neb');
		System.assertEquals(state.stateCode, 'NE');
				
		//TESTING NEVADA
		state = StateFormatter.getState('Nevada');
		System.assertEquals(state.stateCode, 'NV');
		
		state = StateFormatter.getState('NV');
		System.assertEquals(state.stateCode, 'NV');
		        
		state = StateFormatter.getState('nev');
		System.assertEquals(state.stateCode, 'NV');
				
		//TESTING NEW HAMPSHIRE
		state = StateFormatter.getState('New Hampshire');
		System.assertEquals(state.stateCode, 'NH');
		
		state = StateFormatter.getState('NH');
		System.assertEquals(state.stateCode, 'NH');
		        
		state = StateFormatter.getState('newh');
		System.assertEquals(state.stateCode, 'NH');
				
		//TESTING NEW JERSEY
		state = StateFormatter.getState('New Jersey');
		System.assertEquals(state.stateCode, 'NJ');
		
		state = StateFormatter.getState('NJ');
		System.assertEquals(state.stateCode, 'NJ');
		        
		state = StateFormatter.getState('newj');
		System.assertEquals(state.stateCode, 'NJ');
				
		//TESTING NEW MEXICO
		state = StateFormatter.getState('New Mexico');
		System.assertEquals(state.stateCode, 'NM');
		
		state = StateFormatter.getState('NM');
		System.assertEquals(state.stateCode, 'NM');
		        
		state = StateFormatter.getState('newm');
		System.assertEquals(state.stateCode, 'NM');
		
		//TESTING NEW YORK
		state = StateFormatter.getState('New York');
		System.assertEquals(state.stateCode, 'NY');
		
		state = StateFormatter.getState('NY');
		System.assertEquals(state.stateCode, 'NY');
		        
		state = StateFormatter.getState('newy');
		System.assertEquals(state.stateCode, 'NY');
		
		//TESTING NORTH CAROLINA
		state = StateFormatter.getState('North Carolina');
		System.assertEquals(state.stateCode, 'NC');
		
		state = StateFormatter.getState('NC');
		System.assertEquals(state.stateCode, 'NC');
		        
		state = StateFormatter.getState('northc');
		System.assertEquals(state.stateCode, 'NC');
				
		//TESTING NORTH DAKOTA
		state = StateFormatter.getState('North Dakota');
		System.assertEquals(state.stateCode, 'ND');
		
		state = StateFormatter.getState('ND');
		System.assertEquals(state.stateCode, 'ND');
		        
		state = StateFormatter.getState('northd');
		System.assertEquals(state.stateCode, 'ND');
				
		//TESTING NORTHERN MARIANA ISLANDS
		state = StateFormatter.getState('Northern Mariana Islands');
		System.assertEquals(state.stateCode, 'MP');
		
		state = StateFormatter.getState('MP');
		System.assertEquals(state.stateCode, 'MP');
		        
		state = StateFormatter.getState('northernmar');
		System.assertEquals(state.stateCode, 'MP');
				
		//TESTING OHIO
		state = StateFormatter.getState('Ohio');
		System.assertEquals(state.stateCode, 'OH');
				
		state = StateFormatter.getState('OH');
		System.assertEquals(state.stateCode, 'OH');
		        
		state = StateFormatter.getState('ohi');
		System.assertEquals(state.stateCode, 'OH');		
		
		//TESTING OKLAHOMA
		state = StateFormatter.getState('Oklahoma');
		System.assertEquals(state.stateCode, 'OK');
		
		state = StateFormatter.getState('OK');
		System.assertEquals(state.stateCode, 'OK');
		        
		state = StateFormatter.getState('okl');
		System.assertEquals(state.stateCode, 'OK');		
		
		//TESTING OREGON
		state = StateFormatter.getState('Oregon');
		System.assertEquals(state.stateCode, 'OR');
		
		state = StateFormatter.getState('OR');
		System.assertEquals(state.stateCode, 'OR');
		        
		state = StateFormatter.getState('ore');
		System.assertEquals(state.stateCode, 'OR');		
		
		//TESTING PALAU
		state = StateFormatter.getState('Palau');
		System.assertEquals(state.stateCode, 'PW');
		
		state = StateFormatter.getState('PW');
		System.assertEquals(state.stateCode, 'PW');
		        
		state = StateFormatter.getState('pala');
		System.assertEquals(state.stateCode, 'PW');		
		
		//TESTING PENNSYLVANIA
		state = StateFormatter.getState('Pennsylvania');
		System.assertEquals(state.stateCode, 'PA');
		
		state = StateFormatter.getState('PA');
		System.assertEquals(state.stateCode, 'PA');
		        
		state = StateFormatter.getState('pen');
		System.assertEquals(state.stateCode, 'PA');		
		
		//TESTING PUERTO RICO
		state = StateFormatter.getState('Puerto Rico');
		System.assertEquals(state.stateCode, 'PR');
		
		state = StateFormatter.getState('PR');
		System.assertEquals(state.stateCode, 'PR');
		        
		state = StateFormatter.getState('pue');
		System.assertEquals(state.stateCode, 'PR');		
		
		//TESTING RHODE ISLAND
		state = StateFormatter.getState('Rhode Island');
		System.assertEquals(state.stateCode, 'RI');
		
		state = StateFormatter.getState('RI');
		System.assertEquals(state.stateCode, 'RI');
		        
		state = StateFormatter.getState('rho');
		System.assertEquals(state.stateCode, 'RI');		
		
		//TESTING SOUTH CAROLINA
		state = StateFormatter.getState('South Carolina');
		System.assertEquals(state.stateCode, 'SC');
		
		state = StateFormatter.getState('SC');
		System.assertEquals(state.stateCode, 'SC');
		        
		state = StateFormatter.getState('southc');
		System.assertEquals(state.stateCode, 'SC');		
		
		//TESTING SOUTH DAKOTA
		state = StateFormatter.getState('South Dakota');
		System.assertEquals(state.stateCode, 'SD');
		
		state = StateFormatter.getState('SD');
		System.assertEquals(state.stateCode, 'SD');
		        
		state = StateFormatter.getState('southd');
		System.assertEquals(state.stateCode, 'SD');		
		
		//TESTING TENNESSEE
		state = StateFormatter.getState('Tennessee');
		System.assertEquals(state.stateCode, 'TN');
		
		state = StateFormatter.getState('TN');
		System.assertEquals(state.stateCode, 'TN');
		        
		state = StateFormatter.getState('ten');
		System.assertEquals(state.stateCode, 'TN');		
		
		//TESTING TEXAS
		state = StateFormatter.getState('Texas');
		System.assertEquals(state.stateCode, 'TX');
		
		state = StateFormatter.getState('TX');
		System.assertEquals(state.stateCode, 'TX');
		        
		state = StateFormatter.getState('tex');
		System.assertEquals(state.stateCode, 'TX');		
		
		//TESTING UTAH
		state = StateFormatter.getState('Utah');
		System.assertEquals(state.stateCode, 'UT');
		
		state = StateFormatter.getState('UT');
		System.assertEquals(state.stateCode, 'UT');
		        
		state = StateFormatter.getState('uta');
		System.assertEquals(state.stateCode, 'UT');		
		
		//TESTING VERMONT
		state = StateFormatter.getState('Vermont');
		System.assertEquals(state.stateCode, 'VT');
		
		state = StateFormatter.getState('VT');
		System.assertEquals(state.stateCode, 'VT');
		        
		state = StateFormatter.getState('ver');
		System.assertEquals(state.stateCode, 'VT');		
		
		//TESTING VIRGIN ISLANDS
		state = StateFormatter.getState('Virgin Islands');
		System.assertEquals(state.stateCode, 'VI');
		
		state = StateFormatter.getState('VI');
		System.assertEquals(state.stateCode, 'VI');
		        
		state = StateFormatter.getState('virginis');
		System.assertEquals(state.stateCode, 'VI');		
		
		//TESTING VIRGINIA
		state = StateFormatter.getState('Virginia');
		System.assertEquals(state.stateCode, 'VA');
		
		state = StateFormatter.getState('VA');
		System.assertEquals(state.stateCode, 'VA');
		        
		state = StateFormatter.getState('virginia');
		System.assertEquals(state.stateCode, 'VA');		
		
		//TESTING WASHINGTON
		state = StateFormatter.getState('Washington');
		System.assertEquals(state.stateCode, 'WA');
		
		state = StateFormatter.getState('WA');
		System.assertEquals(state.stateCode, 'WA');
		        
		state = StateFormatter.getState('was');
		System.assertEquals(state.stateCode, 'WA');		
		
		//TESTING WEST VIRGINIA
		state = StateFormatter.getState('West Virginia');
		System.assertEquals(state.stateCode, 'WV');
		
		state = StateFormatter.getState('WV');
		System.assertEquals(state.stateCode, 'WV');
		        
		state = StateFormatter.getState('wes');
		System.assertEquals(state.stateCode, 'WV');		
		
		//TESTING WISCONSIN
		state = StateFormatter.getState('Wisconsin');
		System.assertEquals(state.stateCode, 'WI');
		
		state = StateFormatter.getState('WI');
		System.assertEquals(state.stateCode, 'WI');
		        
		state = StateFormatter.getState('wis');
		System.assertEquals(state.stateCode, 'WI');		
		
		//TESTING WYOMING
		state = StateFormatter.getState('Wyoming');
		System.assertEquals(state.stateCode, 'WY');
		
		state = StateFormatter.getState('WY');
		System.assertEquals(state.stateCode, 'WY');
		        
		state = StateFormatter.getState('wyo');
		System.assertEquals(state.stateCode, 'WY');
		
		//TESTING NULL VALUE
		state = StateFormatter.getState('sjfgks');
		System.assertEquals(state, null);
        
        
    }
}